/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  height: 100%;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 深色模式滚动条 */
[data-theme='dark'] ::-webkit-scrollbar-track {
  background: #2f2f2f;
}

[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: #555;
}

[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* 自定义动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.slide-out {
  animation: slideOut 0.3s ease-out;
}

/* 翻页动画效果 */
@keyframes flipOut {
  0% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotateY(-90deg) scale(0.95);
    opacity: 0.5;
  }
  100% {
    transform: rotateY(-180deg) scale(0.9);
    opacity: 0;
  }
}

@keyframes flipIn {
  0% {
    transform: rotateY(180deg) scale(0.9);
    opacity: 0;
  }
  50% {
    transform: rotateY(90deg) scale(0.95);
    opacity: 0.5;
  }
  100% {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
  }
}

/* 斜向移动页面动画 */
@keyframes elegantPageOut {
  0% {
    transform: scale(1) translateY(0px);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
  50% {
    transform: scale(0.96) translateY(-8px);
    opacity: 0.6;
    filter: blur(1px) brightness(0.9);
  }
  100% {
    transform: scale(0.92) translateY(-16px);
    opacity: 0;
    filter: blur(2px) brightness(0.8);
  }
}

@keyframes elegantPageIn {
  0% {
    transform: scale(1.04) translateY(16px);
    opacity: 0;
    filter: blur(2px) brightness(1.1);
  }
  50% {
    transform: scale(1.02) translateY(8px);
    opacity: 0.7;
    filter: blur(1px) brightness(1.05);
  }
  100% {
    transform: scale(1) translateY(0px);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
}

/* 斜向滑动动画 */
@keyframes slideFlipOut {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    filter: brightness(1) blur(0px);
  }
  100% {
    transform: translate(-40%, -40%) scale(0.85);
    opacity: 0;
    filter: brightness(0.7) blur(1px);
  }
}

@keyframes slideFlipIn {
  0% {
    transform: translate(40%, 40%) scale(0.85);
    opacity: 0;
    filter: brightness(1.1) blur(1px);
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    filter: brightness(1) blur(0px);
  }
}

@keyframes pageFlipOut {
  0% {
    transform: perspective(1000px) rotateY(0deg);
    transform-origin: left center;
    opacity: 1;
  }
  100% {
    transform: perspective(1000px) rotateY(-180deg);
    transform-origin: left center;
    opacity: 0;
  }
}

@keyframes pageFlipIn {
  0% {
    transform: perspective(1000px) rotateY(180deg);
    transform-origin: right center;
    opacity: 0;
  }
  100% {
    transform: perspective(1000px) rotateY(0deg);
    transform-origin: right center;
    opacity: 1;
  }
}

/* 斜向移动页面切换动画类 */
.page-elegant-out {
  animation: elegantPageOut 0.35s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.page-elegant-in {
  animation: elegantPageIn 0.4s cubic-bezier(0.0, 0.0, 0.2, 1) forwards;
}

.page-slide-flip-out {
  animation: slideFlipOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.page-slide-flip-in {
  animation: slideFlipIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 微妙的缩放动画 */
@keyframes subtleScaleOut {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    transform: scale(0.96) translateY(-10px);
    opacity: 0;
    filter: blur(1px);
  }
}

@keyframes subtleScaleIn {
  0% {
    transform: scale(1.04) translateY(10px);
    opacity: 0;
    filter: blur(1px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0px);
  }
}

.page-subtle-out {
  animation: subtleScaleOut 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.page-subtle-in {
  animation: subtleScaleIn 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* 3D翻转容器 */
.flip-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.flip-content {
  transition: transform 0.6s ease-in-out;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ant-layout-sider {
    position: fixed !important;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
  }
  
  .ant-layout-content {
    margin-left: 0 !important;
  }
}

/* 布局切换动画 */
@keyframes layoutFadeOut {
  0% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: blur(0px);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.98) rotateY(2deg);
    filter: blur(1px);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) rotateY(5deg);
    filter: blur(2px);
  }
}

@keyframes layoutFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.05) rotateY(-5deg);
    filter: blur(2px);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.02) rotateY(-2deg);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: blur(0px);
  }
}

.layout-changing-out {
  animation: layoutFadeOut 0.25s cubic-bezier(0.4, 0.0, 0.6, 1) forwards;
}

.layout-changing-in {
  animation: layoutFadeIn 0.5s cubic-bezier(0.0, 0.0, 0.2, 1) forwards;
}

/* View Transitions API 主题切换动画 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 999;
  animation: reveal 0.5s ease-out;
}

/* 从浅色到深色的圆形扩散动画 */
@keyframes reveal {
  0% {
    clip-path: circle(0px at var(--circle-x, 50%) var(--circle-y, 50%));
  }
  100% {
    clip-path: circle(var(--circle-radius, 100%) at var(--circle-x, 50%) var(--circle-y, 50%));
  }
}

/* 从深色到浅色的圆形收缩动画 */
html.dark ::view-transition-old(root) {
  z-index: 999;
  animation: reveal-reverse 0.5s ease-out;
}

html.dark ::view-transition-new(root) {
  z-index: 1;
  animation: none;
}

@keyframes reveal-reverse {
  0% {
    clip-path: circle(var(--circle-radius, 100%) at var(--circle-x, 50%) var(--circle-y, 50%));
  }
  100% {
    clip-path: circle(0px at var(--circle-x, 50%) var(--circle-y, 50%));
  }
}

/* 确保 View Transition 的根元素样式 */
::view-transition-group(root) {
  animation-duration: 0.5s;
  animation-timing-function: ease-out;
}

/* 复杂页面的快速主题切换动画 */
.theme-switching-complex ::view-transition-old(root),
.theme-switching-complex ::view-transition-new(root) {
  animation-duration: 0.3s !important; /* 加快动画避免卡顿 */
  animation-timing-function: ease-out !important;
}

.theme-switching-complex ::view-transition-group(root) {
  animation-duration: 0.3s !important;
  animation-timing-function: ease-out !important;
}

/* 不支持 View Transitions 时的降级动画 */
.theme-transition-fallback {
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* 布局切换降级动画 */
.layout-transition-fallback {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.layout-transition-fallback * {
  transition: 
    transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 纯视觉波降级动画（不支持 View Transitions） */
.layout-visual-wave {
  /* 降级时也确保视觉波能够播放 */
  position: relative;
}

.layout-visual-wave::before {
  /* 确保降级时的视觉效果也能正常显示 */
  will-change: opacity, transform;
}

/* 主题切换时的平滑过渡 */
* {
  transition: 
    background-color 0.25s ease-out,
    border-color 0.25s ease-out,
    color 0.25s ease-out,
    box-shadow 0.25s ease-out;
}

/* Ant Design Table 测量行隐藏 - 全局样式 */
.ant-table-measure-row {
  display: none !important;
  height: 0 !important;
  line-height: 0 !important;
  visibility: hidden !important;
}

.ant-table-measure-row td {
  padding: 0 !important;
  margin: 0 !important;
  height: 0 !important;
  border: none !important;
}

/* 复杂页面的主题切换优化 */
.theme-switching-complex {
  /* 提升性能的临时样式 */
  contain: layout style paint; /* CSS containment 优化 */
}

.theme-switching-complex .ant-table {
  /* 表格优化：暂时简化样式 */
  transition: background-color 0.1s ease-out !important;
}

.theme-switching-complex .ant-table-tbody > tr > td {
  /* 表格单元格快速切换 */
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out !important;
  /* 暂时禁用复杂效果 */
  box-shadow: none !important;
}

.theme-switching-complex .ant-table-thead > tr > th {
  /* 表格表头快速切换 */
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out !important;
  box-shadow: none !important;
}

.theme-switching-complex .ant-form-item {
  /* 表单项快速切换 */
  transition: background-color 0.1s ease-out !important;
}

.theme-switching-complex .ant-form-item-label > label {
  /* 表单标签快速切换 */
  transition: color 0.1s ease-out !important;
}

.theme-switching-complex .ant-input, 
.theme-switching-complex .ant-input-number,
.theme-switching-complex .ant-picker {
  /* 输入框快速切换 */
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out !important;
  box-shadow: none !important;
}

.theme-switching-complex .ant-card {
  /* 卡片快速切换 */
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out !important;
  box-shadow: none !important;
}

.theme-switching-complex .ant-statistic {
  /* 统计组件快速切换 */
  transition: color 0.1s ease-out !important;
}

/* 主题切换期间暂时简化动画 */
.theme-switching-complex * {
  /* 减少复杂的变换 */
  transform: none !important;
  /* 快速过渡 */
  transition-duration: 0.1s !important;
  /* 简化缓动函数 */
  transition-timing-function: linear !important;
}

/* GPU加速优化 */
.layout-changing {
  will-change: transform, opacity;
  transform: translateZ(0); /* 强制GPU层 */
}

::view-transition-old(root),
::view-transition-new(root) {
  will-change: clip-path, opacity, transform;
  transform: translateZ(0); /* 强制GPU层 */
}

/* ==================== 布局切换动画 ==================== */

/* 浅色主题的布局切换动画 - 优化性能版本 */
@keyframes layoutRevealLight {
  0% {
    clip-path: circle(0px at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    clip-path: circle(var(--layout-circle-radius, 100%) at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes layoutFadeOutLight {
  0% {
    clip-path: circle(var(--layout-circle-radius, 100%) at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 1;
    transform: scale(1);
  }
  100% {
    clip-path: circle(0px at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 0;
    transform: scale(0.95);
  }
}

/* 深色主题的布局切换动画 - 优化性能版本 */
@keyframes layoutRevealDark {
  0% {
    clip-path: circle(0px at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    clip-path: circle(var(--layout-circle-radius, 100%) at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes layoutFadeOutDark {
  0% {
    clip-path: circle(var(--layout-circle-radius, 100%) at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 1;
    transform: scale(1);
  }
  100% {
    clip-path: circle(0px at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%));
    opacity: 0;
    transform: scale(0.95);
  }
}

/* 浅色主题的布局切换样式 - 延长动画让视觉波完整展示 */
.layout-changing:not(.dark) ::view-transition-old(root) {
  z-index: 1;
  animation: layoutFadeOutLight 0.5s ease-out;
}

.layout-changing:not(.dark) ::view-transition-new(root) {
  z-index: 999;
  animation: layoutRevealLight 0.5s ease-out;
}

/* 深色主题的布局切换样式 - 延长动画让视觉波完整展示 */
.layout-changing.dark ::view-transition-old(root) {
  z-index: 1;
  animation: layoutFadeOutDark 0.5s ease-out;
}

.layout-changing.dark ::view-transition-new(root) {
  z-index: 999;
  animation: layoutRevealDark 0.5s ease-out;
}

/* 为布局切换添加特殊标识 - 延长时间让视觉波完整展示 */
.layout-changing ::view-transition-group(root) {
  animation-duration: 0.5s;
  animation-timing-function: ease-out;
}

/* 纯视觉波动画（不改变布局状态） */
.layout-visual-wave::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%), 
              rgba(24, 144, 255, 0.15) 0%, 
              rgba(24, 144, 255, 0.08) 40%,
              transparent 80%);
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  animation: layoutPulseOptimized 1s ease-out; /* 视觉波完整播放1秒 */
}

/* 布局切换时的视觉波效果 - 延长展示时间 */
.layout-changing::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--layout-circle-x, 50%) var(--layout-circle-y, 50%), 
              rgba(24, 144, 255, 0.15) 0%, 
              rgba(24, 144, 255, 0.08) 40%,
              transparent 80%);
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  animation: layoutPulseOptimized 1s ease-out; /* 延长到1秒 */
}

/* 复杂页面中的主题切换视觉优化 - 避免与布局波冲突 */
.theme-switching-complex.layout-changing::before {
  animation-duration: 0.6s !important; /* 在复杂页面中缩短动画时间 */
  z-index: 600; /* 确保显示优先级 */
}

/* 更长的视觉波脉冲效果 - 充分展示波纹扩散 */
@keyframes layoutPulseOptimized {
  0% { 
    opacity: 0; 
    transform: scale(0.3);
  }
  15% { 
    opacity: 0.6; 
    transform: scale(0.8);
  }
  35% { 
    opacity: 0.9; 
    transform: scale(1.2);
  }
  55% { 
    opacity: 1; 
    transform: scale(1.5);
  }
  75% { 
    opacity: 0.7; 
    transform: scale(1.8);
  }
  90% { 
    opacity: 0.3; 
    transform: scale(2.1);
  }
  100% { 
    opacity: 0; 
    transform: scale(2.5);
  }
}

/* ==================== 移动端日期选择器优化 ==================== */

/* 移动端日期选择器弹出层优化 */
@media (max-width: 768px) {
  /* DatePicker 弹出层容器 */
  .ant-picker-dropdown {
    max-width: 95vw !important;
    max-height: 85vh !important;
    overflow: hidden !important;
    left: 5px !important;
    right: 5px !important;
  }

  /* DatePicker 面板 */
  .ant-picker-panel-container {
    max-width: 100% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* 日期时间面板组合 */
  .ant-picker-datetime-panel {
    max-height: 75vh !important;
    overflow-y: auto !important;
  }

  /* RangePicker 面板整体 */
  .ant-picker-dropdown .ant-picker-panel-container .ant-picker-panels {
    max-height: 75vh !important;
    overflow-y: auto !important;
  }

  /* RangePicker 双面板布局调整 */
  .ant-picker-range-panel {
    flex-direction: column !important;
  }

  /* 每个面板 */
  .ant-picker-panel {
    min-width: auto !important;
    max-width: 100% !important;
  }

  /* 面板头部 */
  .ant-picker-header {
    padding: 4px 8px !important;
  }

  /* 面板头部按钮 */
  .ant-picker-header-view button {
    padding: 2px 4px !important;
    font-size: 12px !important;
  }

  /* 日期网格 */
  .ant-picker-content table {
    font-size: 12px !important;
  }

  /* 日期单元格 */
  .ant-picker-cell {
    padding: 2px !important;
  }

  .ant-picker-cell-inner {
    min-height: 22px !important;
    line-height: 22px !important;
    font-size: 12px !important;
  }

  /* 时间选择面板 */
  .ant-picker-time-panel {
    max-width: 100% !important;
    max-height: 200px !important;
    overflow-y: auto !important;
  }

  .ant-picker-time-panel-column {
    font-size: 11px !important;
    min-width: 50px !important;
    max-width: 60px !important;
  }

  .ant-picker-time-panel-cell {
    padding: 1px 4px !important;
    font-size: 11px !important;
    min-height: 20px !important;
    line-height: 18px !important;
  }

  /* 时间面板标题 */
  .ant-picker-time-panel-column > li:first-child {
    font-size: 10px !important;
    padding: 2px 4px !important;
  }

  /* 底部确认按钮 */
  .ant-picker-footer {
    padding: 8px 12px !important;
  }

  .ant-picker-footer .ant-btn {
    font-size: 12px !important;
    height: 28px !important;
    padding: 4px 12px !important;
  }

  /* RangePicker 分隔符 */
  .ant-picker-range-separator {
    padding: 0 4px !important;
  }

  /* 今天按钮 */
  .ant-picker-today-btn {
    font-size: 11px !important;
  }

  /* 月份/年份选择器 */
  .ant-picker-month-panel .ant-picker-cell,
  .ant-picker-year-panel .ant-picker-cell {
    padding: 4px !important;
  }

  .ant-picker-month-panel .ant-picker-cell-inner,
  .ant-picker-year-panel .ant-picker-cell-inner {
    min-height: 30px !important;
    line-height: 30px !important;
    font-size: 12px !important;
  }

  /* 防止弹出层超出屏幕 */
  .ant-picker-dropdown-range {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
  }

  /* 时间范围选择器的时间面板特殊优化 */
  .ant-picker-dropdown-range .ant-picker-time-panel {
    max-height: 180px !important;
    overflow-y: auto !important;
  }

  /* 确保时间选择不会导致弹层过高 */
  .ant-picker-dropdown-range .ant-picker-panel {
    max-height: 400px !important;
    overflow-y: auto !important;
  }
}

  /* ==================== 移动端时间轮播选择器样式 ==================== */

/* 移动端时间轮播选择器优化 */
@media (max-width: 768px) {
  /* 时间轮播选择器容器 */
  .mobile-time-picker-wheel {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* 时间轮播选择器选中项高亮 */
  .mobile-time-picker-selected {
    background: linear-gradient(45deg, #1890ff, #40a9ff) !important;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3) !important;
    transform: scale(1.05);
  }

  /* 时间轮播选择器平滑滚动 */
  .mobile-time-picker-wheel::-webkit-scrollbar {
    width: 4px;
  }

  .mobile-time-picker-wheel::-webkit-scrollbar-thumb {
    background: #1890ff;
    border-radius: 2px;
  }

  /* 快速选择按钮样式 */
  .mobile-time-picker-quick-btn {
    border-radius: 16px !important;
    font-size: 12px !important;
    height: 28px !important;
    padding: 4px 12px !important;
  }

  /* ==================== 仪表盘移动端表格滚动优化 ==================== */
  
  /* 仪表盘表格容器滚动设置 */
  .dashboard-table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    position: relative !important;
  }
  
  /* 仪表盘表格宽度设置 */
  .dashboard-table-scroll .ant-table {
    min-width: 100% !important;
    width: 100% !important;
  }
  
  /* 仪表盘表格头部固定宽度 */
  .dashboard-table-scroll .ant-table-thead > tr > th {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  
  /* 仪表盘表格内容固定宽度 */
  .dashboard-table-scroll .ant-table-tbody > tr > td {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  
  /* 仪表盘表格滚动条样式 */
  .dashboard-table-scroll::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
  }
  
  .dashboard-table-scroll::-webkit-scrollbar-track {
    background: #f5f5f5 !important;
    border-radius: 3px !important;
  }
  
  .dashboard-table-scroll::-webkit-scrollbar-thumb {
    background: #d9d9d9 !important;
    border-radius: 3px !important;
  }
  
  .dashboard-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #bfbfbf !important;
  }
  
  /* 深色模式下的滚动条 */
  [data-theme='dark'] .dashboard-table-scroll::-webkit-scrollbar-track {
    background: #2f2f2f !important;
  }
  
  [data-theme='dark'] .dashboard-table-scroll::-webkit-scrollbar-thumb {
    background: #555 !important;
  }
  
  [data-theme='dark'] .dashboard-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #777 !important;
  }
  
  /* 仪表盘卡片内表格容器调整 */
  .dashboard-card .ant-card-body {
    padding: 12px !important;
  }
  
  .dashboard-card .ant-table-wrapper {
    margin: 0 !important;
  }
  
  /* 确保仪表盘表格不被负margin影响 */
  .dashboard-card .dashboard-table-scroll .ant-table-wrapper {
    margin: 0 !important;
  }

  /* ==================== 移动端表格优化 ==================== */
  
  /* 表格整体紧凑化 */
  .ant-table {
    font-size: 12px !important;
  }

  /* 表格头部优化 */
  .ant-table-thead > tr > th {
    padding: 6px 8px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    border-bottom: 1px solid #e8e8e8 !important;
  }

  /* 表格内容行优化 */
  .ant-table-tbody > tr > td {
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  /* 表格行高度控制 */
  .ant-table-tbody > tr {
    height: 32px !important;
  }

  /* 隐藏 Ant Design Table 测量行 */
  .ant-table-measure-row {
    display: none !important;
    height: 0 !important;
    line-height: 0 !important;
    visibility: hidden !important;
  }

  .ant-table-measure-row td {
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    border: none !important;
  }

  /* 表格内按钮优化 */
  .ant-table .ant-btn {
    font-size: 10px !important;
    height: 24px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
  }

  /* 表格内的Tag标签优化 */
  .ant-table .ant-tag {
    font-size: 10px !important;
    padding: 1px 4px !important;
    line-height: 1.2 !important;
    margin: 0 2px !important;
  }

  /* 表格分页器优化 */
  .ant-pagination {
    margin: 8px 0 !important;
  }

  .ant-pagination .ant-pagination-item,
  .ant-pagination .ant-pagination-prev,
  .ant-pagination .ant-pagination-next {
    min-width: 28px !important;
    height: 28px !important;
    line-height: 26px !important;
    font-size: 12px !important;
  }

  .ant-pagination .ant-pagination-options {
    margin-left: 8px !important;
  }

  .ant-pagination .ant-select-selector {
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  /* 表格滚动优化 */
  .ant-table-body {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  .ant-table-wrapper {
    font-size: 12px !important;
  }

  /* 表格卡片优化 */
  .ant-card .ant-table-wrapper {
    margin: -16px !important;
  }
  
  /* 仪表盘表格例外：不使用负margin */
  .dashboard-card .ant-table-wrapper {
    margin: 0 !important;
  }

  /* 表格操作列优化 */
  .ant-table .table-actions {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  /* Statistic组件优化 */
  .ant-statistic {
    margin-bottom: 8px !important;
  }

  .ant-statistic-title {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }

  .ant-statistic-content {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  /* Card组件优化 */
  .ant-card {
    margin-bottom: 8px !important;
  }

  .ant-card-head {
    padding: 8px 16px !important;
    min-height: 40px !important;
  }

  .ant-card-head-title {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  .ant-card-body {
    padding: 12px 16px !important;
  }

  /* 表单优化 */
  .ant-form-item {
    margin-bottom: 8px !important;
  }

  .ant-form-item-label > label {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .ant-input,
  .ant-input-number,
  .ant-select-selector {
    font-size: 12px !important;
  }

  /* Space组件间距优化 */
  .ant-space-item {
    margin-right: 8px !important;
  }

  /* Tabs标签页优化 */
  .ant-tabs-tab {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .ant-tabs-content {
    padding-top: 8px !important;
  }
}